import request from '@/utils/request'
import { tradeApi } from '@/utils/comm'

// 查询列表
export function listRentSpu(query) {
  return request({
    url: `${tradeApi}/rentSpu/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getRentSpu(id) {
  return request({
    url: `${tradeApi}/rentSpu/` + id,
    method: 'get'
  })
}

// 新增
export function addRentSpu(data) {
  return request({
    url: `${tradeApi}/rentSpu`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateRentSpu(data) {
  return request({
    url: `${tradeApi}/rentSpu`,
    method: 'put',
    data: data
  })
}

// 删除
export function delRentSpu(ids) {
  return request({
    url: `${tradeApi}/rentSpu/` + ids,
    method: 'DELETE',
  })
}

// 更新服务spu状态
export function updateStatus(data) {
  return request({
    url: `${tradeApi}/rentSpu/updateStatus`,
    method: 'put',
    data: data
  })
}